$(function () {

    //搜索
    $("#search").click(function () {
        let keywordInputDom = $("#keywordInput");
        let keyword = keywordInputDom.val();
        let model = $("#search").data("model");
        let encodeKeyword = encodeURIComponent(keyword);
        window.location.href = "new?" + "keyword=" + encodeURIComponent(keyword) + "&model=" + model;
    });

    //搜索模式切换
    $("#change").click(function () {
        let $search = $("#search");
        let $change = $("#change");
        let temp = $search.text();
        let model = $search.data("model");
        $search.text($change.text());
        $search.data("model", $change.data("model"));
        $change.text(temp);
        $change.data("model", model);
    });


})